/*
 * @Author: fengxx
 * @Date: 2025-10-13 00:09:34
 * @LastEditors: fengxx
 * @LastEditTime: 2025-10-17 14:01:47
 */
import Mock from 'mockjs'

Mock.XHR.responseType = 'json'

Mock.setup({
  timeout: '500-1000', // 设置超时时间
})

Mock.XHR.setup({
  onSend: function (xhr) {
    xhr.setRequestHeader('Cache-Control', 'no-cache')
    xhr.setRequestHeader('Pragma', 'no-cache')
  },
})

// 定义一个GET请求的mock数据
Mock.mock('/api/data', 'get', {
  status: 200,
  data: {
    name: '你好',
    age: 18,
  },
})
